package day6.cal;

public abstract class Cal {
	protected int num1;
	protected int num2;

	public Cal() {
		// new Object();
		super();
	}

	public Cal(int num1, int num2) {
		super();
		this.num1 = num1;
		this.num2 = num2;
	}

	
		// This method must return a result of type int
//		public int getResult() {
//			return 0;
//		}
	
	// This method must return a result of type int
	// 抽象方法：没有方法体，要加上abstract，如果一个类里面有抽象方法，那么这个类必须变成抽象类
	// The abstract method getResult in type Cal can only be defined by an abstract class
	// 抽象方法就是父类不实现，交给子类去实现
	public abstract int getResult();
	
	public int getNum1() {
		return num1;
	}

	public void setNum1(int num1) {
		this.num1 = num1;
	}

	public int getNum2() {
		return num2;
	}

	public void setNum2(int num2) {
		this.num2 = num2;
	}
}
